home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_dlog_paddles.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  88 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_Dlog_paddles.cog   Say the line, Indy.  
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     startup
  14. message     touched
  15.                                                           
  16. sound        in_paddles=Ss04j05.wav        local
  17.  
  18. thing         trigger               
  19. thing        player            local
  20. thing          cam1spot                nolink
  21. thing           cam1look                nolink
  22. thing        offsetcam                  nolink
  23. thing        offsettarg               nolink
  24.  
  25. flex        viewangle                local
  26.  
  27. int            spoken=0        local
  28.  
  29. end
  30.  
  31. # ========================================================================================
  32.  
  33. code
  34.  
  35. startup:
  36.     
  37.           
  38.     player = GetLocalPlayerThing();
  39.     return;
  40.  
  41. touched:
  42.     
  43.     if ((GetSenderRef() == trigger) && (spoken == 0)) 
  44.     {
  45.         spoken=1;
  46.         print("activated");
  47.         MakeMeStop();
  48.         StartCutscene(1);
  49.           
  50.         # Camera stuff
  51.         MakeCamera2LikeCamera1(cam1spot, cam1look);
  52.         SetCameraLookInterp(2, 0);            # kill pan & tilt to lock on 2nd target
  53.           SetCameraPosInterp(2, 0);            # kill dolly mode too
  54.         SetCameraFocus(2, cam1spot);        # cam 2 takes over here
  55.         SetCameraSecondaryFocus(2, cam1look); #looking same place
  56.         viewangle = GetCameraFOV(); # it pays to be careful
  57.         SetCurrentCamera(2);
  58.         SetCameraFOV(viewangle, 0, 0.0); # start here anyway
  59.         SetCameraLookInterp(2, 1);             
  60.         SetCameraPosInterp(2, 1);
  61.         SetCameraInterpSpeed(2, 0.7); # about right
  62.         Sleep(0.01);
  63.         SetCameraFocus(2, offsetcam);  # slide out to new spot
  64.         SetCameraSecondaryFocus(2, offsettarg);    # slide over to new target
  65.         
  66.  
  67.         sleep(.5);
  68.             
  69.         # "Paddles, the monks..."
  70.         PlayVoice(player, in_paddles, 1.0, 1);
  71.         
  72.           SetCameraLookInterp(2, 0); # kill pan & tilt mode
  73.         SetCameraPosInterp(2, 0); # kill dolly mode
  74.         SetCameraPosition(1, GetThingPos(offsetcam)); # prep to swing back to follow-cam
  75.         sleep(.01);
  76.         SetCurrentCamera(1);
  77.         
  78.         ClearActorFlags(player, 0x200000); # player in control
  79.         EndCutscene();
  80.     }
  81.     
  82. return;
  83.      
  84.   
  85.  
  86. end
  87.  
  88.